Optimal. Leaf size=79 \[ \frac{1}{2} \sqrt{a+b x^2} (2 A+B x)-\sqrt{a} A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )+\frac{a B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0605239, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35, Rules used = {815, 844, 217, 206, 266, 63, 208} \[ \frac{1}{2} \sqrt{a+b x^2} (2 A+B x)-\sqrt{a} A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )+\frac{a B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 815
Rule 844
Rule 217
Rule 206
Rule 266
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{(A+B x) \sqrt{a+b x^2}}{x} \, dx &=\frac{1}{2} (2 A+B x) \sqrt{a+b x^2}+\frac{\int \frac{2 a A b+a b B x}{x \sqrt{a+b x^2}} \, dx}{2 b}\\ &=\frac{1}{2} (2 A+B x) \sqrt{a+b x^2}+(a A) \int \frac{1}{x \sqrt{a+b x^2}} \, dx+\frac{1}{2} (a B) \int \frac{1}{\sqrt{a+b x^2}} \, dx\\ &=\frac{1}{2} (2 A+B x) \sqrt{a+b x^2}+\frac{1}{2} (a A) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x}} \, dx,x,x^2\right )+\frac{1}{2} (a B) \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{x}{\sqrt{a+b x^2}}\right )\\ &=\frac{1}{2} (2 A+B x) \sqrt{a+b x^2}+\frac{a B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}}+\frac{(a A) \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b x^2}\right )}{b}\\ &=\frac{1}{2} (2 A+B x) \sqrt{a+b x^2}+\frac{a B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}}-\sqrt{a} A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )\\ \end{align*}
Mathematica [A] time = 0.208145, size = 100, normalized size = 1.27 \[ \frac{1}{2} \left (\frac{a^{3/2} B \sqrt{\frac{b x^2}{a}+1} \sinh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{b} \sqrt{a+b x^2}}+\sqrt{a+b x^2} (2 A+B x)-2 \sqrt{a} A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 78, normalized size = 1. \begin{align*}{\frac{Bx}{2}\sqrt{b{x}^{2}+a}}+{\frac{Ba}{2}\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){\frac{1}{\sqrt{b}}}}-A\sqrt{a}\ln \left ({\frac{1}{x} \left ( 2\,a+2\,\sqrt{a}\sqrt{b{x}^{2}+a} \right ) } \right ) +A\sqrt{b{x}^{2}+a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.66101, size = 859, normalized size = 10.87 \begin{align*} \left [\frac{B a \sqrt{b} \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) + 2 \, A \sqrt{a} b \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right ) + 2 \,{\left (B b x + 2 \, A b\right )} \sqrt{b x^{2} + a}}{4 \, b}, -\frac{B a \sqrt{-b} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - A \sqrt{a} b \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right ) -{\left (B b x + 2 \, A b\right )} \sqrt{b x^{2} + a}}{2 \, b}, \frac{4 \, A \sqrt{-a} b \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right ) + B a \sqrt{b} \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) + 2 \,{\left (B b x + 2 \, A b\right )} \sqrt{b x^{2} + a}}{4 \, b}, -\frac{B a \sqrt{-b} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - 2 \, A \sqrt{-a} b \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right ) -{\left (B b x + 2 \, A b\right )} \sqrt{b x^{2} + a}}{2 \, b}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 5.04436, size = 107, normalized size = 1.35 \begin{align*} - A \sqrt{a} \operatorname{asinh}{\left (\frac{\sqrt{a}}{\sqrt{b} x} \right )} + \frac{A a}{\sqrt{b} x \sqrt{\frac{a}{b x^{2}} + 1}} + \frac{A \sqrt{b} x}{\sqrt{\frac{a}{b x^{2}} + 1}} + \frac{B \sqrt{a} x \sqrt{1 + \frac{b x^{2}}{a}}}{2} + \frac{B a \operatorname{asinh}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )}}{2 \sqrt{b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19014, size = 105, normalized size = 1.33 \begin{align*} \frac{2 \, A a \arctan \left (-\frac{\sqrt{b} x - \sqrt{b x^{2} + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} - \frac{B a \log \left ({\left | -\sqrt{b} x + \sqrt{b x^{2} + a} \right |}\right )}{2 \, \sqrt{b}} + \frac{1}{2} \, \sqrt{b x^{2} + a}{\left (B x + 2 \, A\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]